from tkinter import *

root=Tk()
root.title("ИТ марафон")
root.geometry("500x500")

canvas=Canvas(bg="white",width=500,height=500)
canvas.pack(anchor=CENTER, expand=1)
print("Введите координаты начальной точки:")
x= int(input("x = "))
y= int(input("y = "))
a= int(input("a = "))
canvas.create_polygon(x,y, x+(20*a),y ,x+(20*a),y+(20*a) ,x+(40*a) ,y+(20*a)  ,x+(40*a),y ,x+(60*a),y, x+(60*a),y+(40*a), x,y+(40*a) ,x,y)

if a==0 and x>0 and y>0 and x+(60*a)<500 and y+(60*a)<500:
    pass
else:
    if a>0 and x>0 and y>0 and x+(60*a)<500 and y+(60*a)<500:
        pass
    else:
        if a<0 and x+(60*a)>0 and y+(60*a)>0 and y+(60*a)<500 and y+(60*a)<500:
            pass
        else:
            print("Ошибка")
            exit()
root.mainloop()












